﻿using SqlSugar;
using System;

namespace Hx.ADSyncPlatform.Entity.Entities
{

    public class Plat_OperateLog
    {
        [SugarColumn(IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 操作人ID
        /// </summary>
        public string OperatePlatManagerId { get; set; }


        /// <summary>
        /// 操作人账号
        /// </summary>
        public string OperatePlatManager { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        public string RequestAddress { get; set; }

        /// <summary>
        /// 请求类型
        /// </summary>
        public string RequestType { get; set; }

        /// <summary>
        /// body
        /// </summary>
        public string RequestBody { get; set; }

        /// <summary>
        /// 客户端ip
        /// </summary>
        public string IP { get; set; }

        /// <summary>
        /// 服务端IP
        /// </summary>
        public string ServerIP { get; set; }


        /// <summary>
        /// 行为类型
        /// </summary>
        public string BehaviorType { get; set; }

        /// <summary>
        /// 操作结果
        /// </summary>
        public string OperateResult { get; set; } = "Success";


        /// <summary>
        /// 操作说明
        /// </summary>
        public string LogMessage { get; set; }


        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime OperateTime { get; set; }

        /// <summary>
        /// 操作开始时间
        /// </summary>
        public DateTime? OperateBeginTime { get; set; }

        /// <summary>
        /// 操作完成时间
        /// </summary>
        public DateTime? OperateEndTime { get; set; }


        /// <summary>
        /// 操作耗时 （毫秒）
        /// </summary>
        public long? OperateTimeConsuming { get; set; }
    }


    public enum OperateResult
    {
        Fail = 0,
        Success = 1,

    }
    public enum BehaviorType
    {
        Login = 1,
        Operation = 2,
        See = 3,
        Exception = 4
    }

    public enum RequestMethod
    {
        Get,
        Post,
        Put,
        Patch,
        Delete
    }
}
